<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/header/Header.jsp"></jsp:include>
<title>Insert title here</title>

<script type="text/javascript" src="/common/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	
   $("#bt").click(function(){
	   var logid = $("input[name=logid]").val();
	   var pwd = $("input[name=pwd]").val();
	$.ajax({
		type:"post",
		url:"/ac/login.tump",
		dataType:"text",
		data:"uid="+logid+"&pwd="+pwd+"",
		success:function(call){
		 if(call ==0){
			 alert("없는 아이디 입니다. 다시 입력해 주세요.");
		}else if(call == 1){
			alert("로그인에 성공하셨습니다.");
			location.href="/pr/pros.tump";
			
		}else if(call == 2){
			alert("비밀번호가 틀렸습니다.");
		}
	      }
     });
	
   });
});
</script>
</head>
<body>
<table border=1 width="1000px" height="1000px">
		<tr>
			<td width="10%">1</td>
			<td valign="top">

				<table cellpadding="1"height="50%" width="100%" border="1">
					<tr>
						<td colspan="4" height="100px"></td>
					</tr>
					<tr>
						<td align="center" height="30px" width="25%">아이디</td>
						<td height="30px" width="10px">&nbsp;<input name="logid" type="text"/></td>
					</tr>
					<tr>
						<td align="center" height="30px" width="25%">비밀번호</td>
						<td height="30px" width="10px">&nbsp;<input name="pwd"  type="password"/></td>
					</tr>
					<tr>
						<td colspan="2"><input id="bt" type="button" value="로그인 "/></td>
					</tr>
				</table>
				</td>
		 </tr>
</table>
				
</body>
</html>